const a = [1, 2, 3]

a.forEach(item => {
  item = item * 2
})


let obj = { '1': 1 }
let oldArr = ['1', 1, obj, true]
oldArr.forEach((el) => {
  if (typeof el == 'object') {
    el['2'] = 2
  }
  el = 2
})
console.log(oldArr)
